package com.credithc.customers.base.constants;

import java.util.Arrays;
import java.util.List;

/**
 * @author zhukai
 * @date 2018/11/29 14:41
 */
public class CustomerConstants {

    //状态类型常量

    /**
     * 联系方式校验通过
     */
    public static final String STATUS_CONTACT_VERIFIED = "0";

    /**
     * 联系方式未校验
     */
    public static final String STATUS_CONTACT_UNVERIFIED = "1";

    /**
     * 三要素校验通过
     */
    public static final String STATUS_ELEMENTS_VERIFIED = "0";

    /**
     * 三要素未校验
     */
    public static final String STATUS_ELEMENTS_UNVERIFIED = "1";

    /**
     * 待处理
     */
    public static final Integer STATUS_TODO = 0;

    /**
     * 成功
     */
    public static final Integer STATUS_SUCCESS = 1;

    /**
     * 失败
     */
    public static final Integer STATUS_FAIL = 2;

    /**
     * 通知状态-未通知
     */
    public static final Integer NOTICE_STATUS_TODO = 0;

    /**
     * 通知状态-通知成功
     */
    public static final Integer NOTICE_STATUS_SUCCESS = 1;

    /**
     * 通知状态-通知失败
     */
    public static final Integer NOTICE_STATUS_FAIL = 2;

    /**
     * 账户状态-可用
     */
    public static final Integer STATUS_ACCOUNT_AVAILABLE = 1;

    /**
     * 账户状态-不可用
     */
    public static final Integer STATUS_ACCOUNT_UNAVAILABLE = 2;

    // 客户类型

    /**
     * 用户前缀
     */
    public static final String PRE_CUSTOMER_PREFIX = "Y";
    /**
     * 个人客户前缀
     */
    public static final String PERSONAL_CUSTOMER_PREFIX = "1";
    /**
     * 企业客户前缀
     */
    public static final String COMPANY_CUSTOMER_PREFIX = "2";
    /**
     * 金融客户前缀
     */
    public static final String FINANCIAL_CUSTOMER_PREFIX = "3";

    /**
     * 角色关系来源-接口上送
     */
    public static final Integer CUSTOMER_RELATION_INTERFACE = 1;

    /**
     * 角色关系来源-产品关联
     */
    public static final Integer CUSTOMER_RELATION_PRODUCT = 2;
    /**
     * 客户关系角色-使用中
     */
    public static final Integer CUSTOMER_ROLE_EFFECTIVE = 1;

    /**
     * 客户关系角色-已停止
     */
    public static final Integer CUSTOMER_ROLE_UNEFFECTIVE = 2;

    /**
     * 业务信息处理状态-待处理
     */
    public static final Integer CUSTOMER_RELATION_TODO = 0;

    /**
     * 业务信息处理状态-已变更处理
     */
    public static final Integer CUSTOMER_RELATION_MODIFY = 1;
    /**
     * 业务信息处理状态-已合并处理
     */
    public static final Integer CUSTOMER_RELATION_MERGE = 2;

    //新增客户信息类型

    /**
     * 新增证件
     */
    public static final Integer ADD_CONTACT_INFO = 1;

    /**
     * 新增联系方式
     */
    public static final Integer ADD_ID_INFO = 2;

    /**
     * 新增证件和联系方式
     */
    public static final Integer ADD_ID_CONTACT_INFO = 3;
    /**
     * 客户性质-用户
     */
    public static final Integer CUSTOMER_PROPERTY_PRE = 0;

    /**
     * 客户性质-客户
     */
    public static final Integer CUSTOMER_PROPERTY_OFFICIAL = 1;

    //客户类型常量

    /**
     * 客户类别-个人客户
     */
    public static final String CUSTOMER_TYPE_PERSON = "1";

    /**
     * 客户类别-企业客户
     */
    public static final String CUSTOMER_TYPE_COMPANY = "2";

    /**
     * 客户类别-金融机构
     */
    public static final String CUSTOMER_TYPE_FINANCE = "3";


    //证件类型
    /**
     * 中华人民共和国居民身份证
     */
    public static final String CERTIFICATE_TYPE_ID_CARD = "1";

    /**
     * 护照
     */
    public static final String CERTIFICATE_TYPE_PASSPORT = "2";

    /**
     * 港澳台同胞回乡证
     */
    public static final String CERTIFICATE_TYPE_HMT = "3";

    /**
     * 外国人永久居留证
     */
    public static final String CERTIFICATE_TYPE_FOREIGNER = "4";

    /**
     * 军官证
     */
    public static final String CERTIFICATE_TYPE_OFFICER = "5";


    //变更类型常量

    /**
     * 联系方式变更
     */
    public static final String MODIFY_TYPE_CONTACT = "1";

    /**
     * 三要素变更
     */
    public static final String MODIFY_TYPE_ELEMENTS = "2";


    // 联系方式类型

    /**
     * 手机号码
     */
    public static final String CONTACT_TYPE_MOBILE = "1";

    /**
     * 邮箱
     */
    public static final String CONTACT_TYPE_EMAIL = "2";

    /**
     * 固定电话
     */
    public static final String CONTACT_TYPE_TELEPHONE = "3";

    /**
     * 用户标识
     */
    public static final String CONTACT_TYPE_USER_ID = "4";

    /**
     * 接受状态-失败
     */
    public static final Integer RECEIVE_STATUS_FAIL = 1;

    /**
     * 接受状态-成功
     */
    public static final Integer RECEIVE_STATUS_SUCCESS = 0;
    /**
     * 异常信息处理状态-待处理
     */
    public static final Integer ABNORMAL_STATUS_TODO = 0;

    /**
     * 异常信息处理状态-已处理
     */
    public static final Integer ABNORMAL_STATUS_DEAL = 1;
    /**
     * 异常信息异常类型-客户信息异常
     */
    public static final Integer ABNORMAL_TYPE_ERROR = 0;

    /**
     * 异常信息异常类型-客户信息不一致
     */
    public static final Integer ABNORMAL_TYPE_DIFFERENT = 1;
    /**
     * 异常信息处理状态-无需处理
     */
    public static final Integer ABNORMAL_STATUS_NODEAL = 2;
    /**
     * 业务信息变更处理状态-待处理
     */
    public static final Integer BIZ_MODIFY_STATUS_TODO = 0;

    /**
     * 业务信息变更处理状态-已变更处理
     */
    public static final Integer BIZ_MODIFY_STATUS_CHANGE = 1;
    /**
     * 业务信息变更处理状态-已合并处理
     */
    public static final Integer BIZ_MODIFY_STATUS_MERGE = 2;
    /**
     * 业务信息变更处理状态-处理失败
     */
    public static final Integer BIZ_MODIFY_STATUS_FAIL = 3;

    /**
     * 通知信息处理状态-未处理
     */
    public static final Integer NOTICE_RECEIPT_TODO = 0;
    /**
     * 通知信息处理状态-未处理
     */
    public static final Integer NOTICE_RECEIPT_DONE = 1;
    /**
     * 前缀客户号，
     */
    public static final String IS_CUSTOMER_PREFIX = "1,2,3";
    /**
     * 客户类别-分类
     */
    public static final String IS_CUSTOMER_TYPE = "1,2,3";

    /**
     * 客户号来源类型-用户号转化
     */
    public static final Integer CUSTOMER_SOURCE_PRE = 1;

    /**
     * 客户号来源类型-客户合并
     */
    public static final Integer CUSTOMER_SOURCE_MERGE = 2;

    //验签


    public static final String KEY_ALGORITHM = "RSA";

    public static final String ROLE_TBR = "3";
    public static final String ROLE_BBR = "4";
    public static List CONTACT_TYPE_LIST = Arrays.asList("1", "2", "3", "4");
    public static List ID_TYPE_LIST = Arrays.asList("1", "2", "3", "4", "5");
    //针对 商户端用法人身份开户特殊场景，系统标识类似GZTB/GZTB,只生成客户关系，不关联用户信息
    public static final List MERCHANTS_EXPECT_LIST = Arrays.asList("BDSHM", "GZTB");

//    public static List SMS_TYPE_LIST = Arrays.asList("0","1", "2", "3", "4", "5");


    //系统是否已接入

    public static Integer SYSTEM_ACCESSED = 1;

    public static Integer SYSTEM_NOT_ACCESSED = 0;

    //导入类型

    public static Integer IMPORT_TYPE_PRE = 0;
    public static Integer IMPORT_TYPE_PERSONAL = 1;
    public static Integer IMPORT_TYPE_COMPANY = 2;

    public static Integer IMPORT_STATUS_ING = 0;
    public static Integer IMPORT_STATUS_SUCCESS = 1;

    public static final String STATS_CUSTOMER_COUNT = "customerCount";
    public static final String STATS_CUSTOMER_SUM = "customerSum";
    public static final String STATS_PRE_CUSTOMER_CHANGE = "preCustomerChangeSum";

    public static final String SYSTEM_NAME = "CUSTOMER";
    public static final String DATA_TYPE_NAME = "AllData";
    public static final String IDENTIFY_CHECK = "check";

    /**
     * 客户角色来源
     */
    public static final List ROLE_SOURCE_LIST = Arrays.asList("account", "product", "none");

    /**
     * 账户
     */
    public static final String ROLE_SOURCE_ACCOUNT = "account";

    /**
     * 产品
     */
    public static final String ROLE_SOURCE_PRODUCT = "product";

    /**
     * 没有角色信息
     */
    public static final String ROLE_SOURCE_NONE = "none";

    /**
     * 客户关系来源
     */
    public static final List RELATION_SOURCE_LIST = Arrays.asList("account", "product", "none");

    /**
     * 账户类型
     */

    //出借人存管账户
    public static final String CUSTOMER_ACCOUNT_TYPE_LEND = "1";

    //借款人存管账户
    public static final String CUSTOMER_ACCOUNT_TYPE_LOAN = "2";

    //银行卡
    public static final String CUSTOMER_ACCOUNT_TYPE_BANK_CARD = "3";

    //多乐融出借人
    public static final String DLR_ACCOUNT_TYPE_LEND = "1";

    //恒易融出借人
    public static final String HYR_ACCOUNT_TYPE_LEND = "1";

    public static final String DLR = "DLR";

    public static final String HYR = "HYR";

    public static final String BDB = "BDB";

    public static final String FUND = "FUND";

    public static final String BX = "BX";

    public static final String XHQB = "XHQB";

    public static final String HYD = "HYD";

    public static final String JHZF = "JHZF";

    public static final String XD = "XD";

    public static final String XT = "XT";

    public static final String HHR = "HHR";

    public static final String HHR_JK = "HHR_JK";

    public static final String ZNKF = "ZNKF";
    //统一登录主系统标识
    public static final String YZT = "YZT";
    public static final String HSH = "HSH";
    public static final String TUIKE = "TUIKE";
    public static final String SMZB = "SMZB";
    //本地生活
    public static final String BDSHM = "BDSHM";
    //小恒商城-恒易购
    public static final String XHSC = "XHSC";

    public static final Integer CARD_TYPR_ID_CARD = 1;

    public static final Integer DLR_CARD_TYPR_ID_CARD = 0;

    /**
     * 接口验签规则
     */
    public static final String UNIFY_CHECK_CODE = "code";

    public static final String UNIFY_CHECK_API = "api";

    public static final String UNIFY_CHECK_ALL = "all";

    /**
     * 系统code
     */
    public static final Integer DLR_CODE = 2;
    public static final Integer HYR_CODE = 3;
    public static final Integer XHQB_CODE = 11;
    public static final Integer GD = 12;


    /**
     * 智能客服-借款用户
     */
    public static final String USER_JK = "1";

    /**
     * 智能客服-出借用户
     */
    public static final String USER_CF = "2";


    /**
     * 统一登录code状态-默认有效
     */
    public static final Integer CODE_VALID = 1;

    /**
     * 统一登录code状态-无效
     */
    public static final Integer CODE_INVALID = 2;
    /**
     * 统一登录是否注册；0-未注册,授信产生用户记录，1-已注册，登陆接口产生用户记录
     */
    public static final Integer REGISTER_STATUS = 1;

    public static final Integer UNREGISTER_STATUS = 0;

    public static final String SMS_TEMPLATE_YZM = "yzm";

    public static final String SMS_TEMPLATE_TZ = "tz";

    public static final String SMS_TEMPLATE_PWD_YZM = "pwdyzm";

    public static final String LOCAL_ADDR = "127.0.0.1";

    public static final Integer NOT_TENANT = -1;
//        "1", "查询成功"
//        "2", "系统内部错误"
//        "-10000", "请求参数缺失"
//        "-10001", "请求参数无效"
//        "-20000", "三方返回错误" 校验失败
//        "-40000", "账户被冻结"
//        "-40001", "认证失败"
//        "-50000", "系统内部错误"
//        "-50001", "第三方系统错误"
    public static List ZCX_SUCEESS_CODE_LIST = Arrays.asList("1", "-20000");

    public static List ZCX_FAIL_CODE_LIST = Arrays.asList("2","-10000", "-10001", "-40000", "-40001", "-50000", "-50001");



}
